<?php
/*
 * Created on 28.03.2006
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */

class HSBottlePostageCalculator
{

    function calc (& $om, $id)
    {
        $count = 0;
        $cart = $om->cartArticles();
        for ($i = 0; $i < count($cart); $i++)
        {
            $count += $cart[$i]['quantity'];
        }
        return array('cost' => (ceil($count / 12) * 8), 'quantity' => (ceil($count / 12)*12), 'unit' => 'Stk.');
    }

} 
 
?>
